//css画箭头
@mixin setArrow($direction, $arrowSize, $borderColor, $borderWidth) {
  display: inline-block !important;
  height: $arrowSize;
  width: $arrowSize;
  border-width: $borderWidth $borderWidth 0 0 !important;
  border-color: $borderColor !important;
  border-style: solid !important;
  @if $direction == up {
    transform: matrix(0.71, -0.71, 0.71, 0.71, 0, 0); // rotate(-45deg)
  } @else if $direction == right {
    transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0); // rotate(45deg);
    position: relative;
    top: -2px;
  } @else if $direction == down {
    transform: matrix(-0.71, 0.71, -0.71, -0.71, 0, 0); // rotate(135deg);
    position: relative;
    top: -3px;
  } @else {
    transform: matrix(-0.71, -0.71, 0.71, -0.71, 0, 0); // rotate(-135deg);
    position: relative;
    top: -2px;
  }
}

// 设置上分割线
@mixin setTopLine($direction, $c, $seg-color) {
  content: " ";
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  height: 1px;
  border-top: 1px solid $c;
  color: $c;
  transform-origin: 0 0;
  transform: scaleY(0.5);
}

// 设置下分割线
@mixin setBottomLine($c) {
  content: " ";
  position: absolute;
  left: 0;
  bottom: 0;
  right: 0;
  height: 1px;
  border-bottom: 1px solid $c;
  color: $c;
  transform-origin: 0 100%;
  transform: scaleY(0.5);
}

// 设置左分割线
@mixin setLeftLine($c, $seg-color) {
  content: " ";
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  bottom: 0;
  border-left: 1px solid $c;
  color: $c;
  transform-origin: 0 0;
  transform: scaleX(0.5);
}

// 设置右分割线
@mixin setRightLine($c, $seg-color) {
  content: " ";
  position: absolute;
  right: 0;
  top: 0;
  width: 1px;
  bottom: 0;
  border-right: 1px solid $c;
  color: $c;
  transform-origin: 100% 0;
  transform: scaleX(0.5);
}

// 清除浮动
@mixin clearfix() {
  &:after {
    clear: both;
    content: '';
    display: block;
    height: 0;
    line-height: 0;
    overflow: hidden;
  }
}

// 文本换行
@mixin ellipsis($w:auto) {
  width: $w;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  word-wrap: normal;
}
